﻿using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace Fish_Atlantis
{
    public  static class CreateData
    {
        public static void CreateRiskData()
        {
            int FisheryID1, Month1, Risk_Rank1;
            Random rad = new Random(unchecked((int)DateTime.Now.Ticks));
            FisheryID1 = rad.Next(1, 11);
            if (FisheryID1 == 5 || FisheryID1 == 9)
                FisheryID1 = 6;
            Month1 = rad.Next(1, 12);
            Risk_Rank1 = rad.Next(1, 3);
            String Comment1="XXXX is under attack!!!";
            if (Risk_Rank1 == 3)
                Comment1 = null;
            string create1 = "INSERT INTO Risk"+"(FisheryID,Month,Risk_Rank,Comment)"+"values"
                + "('" + FisheryID1 + "','" + Month1 + "','" + Risk_Rank1 + "','" + Comment1 + "')";
            Helper.ExecSQL(create1);
        }
      /*  public static void CreateTranscation_RecordData()
        {
            int CustomerID1,SupplierID1,FisheryID1,Amount1;
            Random rad = new Random(unchecked((int)DateTime.Now.Ticks));
            CustomerID1 = rad.Next(1,12);
            if (CustomerID1 % 3 != 1)
            {
                int a = CustomerID1 % 3;
                if (a == 2)
                    CustomerID1 = CustomerID1 - 1;
                else
                    CustomerID1 = CustomerID1 + 1;
            }
            SupplierID1 = rad.Next(1, 12);
            if (SupplierID1 % 3 != 2)
            {
                int b = SupplierID1 % 3;
                if (b == 1)
                    SupplierID1 = SupplierID1 + 1;
                else
                    SupplierID1 = SupplierID1 + 2;
            }
            FisheryID1 = rad.Next(1, 11);
            if (FisheryID1 == 5 || FisheryID1 == 9)
                FisheryID1 = 6;
            Amount1 = rad.Next(1, 9);
            Amount1 = Amount1 * 10000;
            int a1 = rad.Next(2000, 2020);
            int a2 = rad.Next(1, 12);
            int a3 = rad.Next(1,28);
            DateTime Date1=DateTime.

            string create1 = "INSERT INTO Transaction_Record" + "(CustomerID,SupplierID,FisheryID,Amount,Date,Period)" + "values"
                + "('" + CustomerID1 + "','" + SupplierID1 + "','" +FisheryID1+ "','" + Amount1 + "','" + Date1 + "','" + Period1 + "')";
        }*/
    }

}